<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>layui-demo</title>
        <link rel="stylesheet" type="text/css" href="layui/css/layui.css">
        <script src="layui/layui.js"></script>


        <!-- cdn -->
        <!-- <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
    <script src="https://www.layuicdn.com/layui/layui.js"></script> -->
    </head>



    <body>






    </body>
    <script>
        //Demo
       layui.use(['util', 'laydate', 'layer'], function(){
            var form = layui.form;
            var element = layui.element;
            var layer = layui.layer;
              var util = layui.util;
            //固定块
            util.fixbar({
                bar1: '↑',
                bar2: '←',
                css: {
                    right: 50,
                    bottom: 100
                },
                bgcolor: '#007c00',
                click: function(type) {
                    if (type === 'bar1') {
                        layer.msg('回到顶部');
                    } else if (type === 'bar2') {
                         layer.msg('回到上一页');
                    }
                }
            });

        });



        //layer.alert('见到你真的很高兴', {icon: 6});
    </script>
</html>
